// pages/allOrders/index.js
Page({
  data: {
    uid: null,

  },

  onLoad: function (options) {
    let uid = options.uid;
    console.log(uid);
    wx.request({
      // 标题
      url: 'http://460d80b632.zicp.vip/WeChat/order.php',
      method: "POST",
      data: {
        "uid": uid,
      },
      header: {
        "Content-Type": "application/x-www-form-urlencoded"
      },
      success: (res) => {
        // console.log(res);
        let allOrders = res.data;
        // console.log(allOrders);
        this.setData({
          allOrders
        })
      }
    });
    if (uid != null)
      this.setData({
        uid
      })
  },
})